<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>清除最近一次错误</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.error-clear-last" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">error_clear_last</h1>
  <p class="verinfo">(PHP 7)</p><p class="refpurpose"><span class="refname">error_clear_last</span> &mdash; <span class="dc-title">清除最近一次错误</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.error-clear-last-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>error_clear_last</strong></span>
    ( <span class="methodparam">void</span>
   ) : <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.error-clear-last-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   清除最近一次错误，使它无法通过 
   <span class="function"><a href="error_get_last.html" class="function">error_get_last()</a></span> 获取。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.error-clear-last-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-458">
    <p><strong>Example #1 <span class="function"><strong>error_clear_last()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">error_get_last</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">error_clear_last</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">error_get_last</span><span style="color: #007700">());<br /><br />@</span><span style="color: #0000BB">$a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$b</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">error_get_last</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">error_clear_last</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">error_get_last</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
NULL
NULL
array(4) {
  [&quot;type&quot;]=&gt;
  int(8)
  [&quot;message&quot;]=&gt;
  string(21) &quot;Undefined variable: b&quot;
  [&quot;file&quot;]=&gt;
  string(9) &quot;%s&quot;
  [&quot;line&quot;]=&gt;
  int(6)
}
NULL
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.error-clear-last-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><a href="errorfunc.constants.html" class="link">Error 常量</a></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>